Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve SRV hostname before passing it to mongodb-cloud-info VSCODE-442 #594

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

addaleax
Copy link
Contributor

Right now, we are passing the first hostname from the connection string to mongodb-cloud-info, regardless of whether the connection string is a mongodb:// connection string or a mongodb+srv:// one.

In the latter case, telemetry gathering fails, because mongodb-cloud-info expects the name of an actual host with associated A or AAAA records (so that it can look up the host’s IP address), not a SRV one.

Using resolve-mongodb-srv first matches what Compass does and solves this issue.

Description

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

…ODE-442

Right now, we are passing the first hostname from the connection string
to mongodb-cloud-info, regardless of whether the connection string is a
`mongodb://` connection string or a `mongodb+srv://` one.

In the latter case, telemetry gathering fails, because
mongodb-cloud-info expects the name of an actual host with associated
A or AAAA records (so that it can look up the host’s IP address),
not a SRV one.

Using resolve-mongodb-srv first matches what Compass does and
solves this issue.
@addaleax addaleax merged commit c54f829 into main Sep 21, 2023
5 checks passed
@addaleax addaleax deleted the 442-dev branch September 21, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants